/*
 * Copyright (C), 2002-2017, 苏宁易购电子商务有限公司
 * FileName: StoreExpandVo.java
 * Author:   15050536
 * Date:     2017年3月31日 上午11:38:13
 * Description: //模块目的、功能描述      
 * History: //修改记录
 * <author>      <time>      <version>    <desc>
 * 修改人姓名             修改时间            版本号                  描述
 */
package com.suning.sawp.member.vo;

import java.io.Serializable;
import java.util.List;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.joda.time.DateTime;

import com.suning.sawp.member.constant.MemberConstants;

/**
 * 门店外拓的vo
 *
 * @author 15050536 石键平
 */
public class StoreExpandVo implements Serializable {

	/**
	 */
	private static final long serialVersionUID = -4713082166935102974L;

	/**
	 * 拓展id
	 */
	private String expandId;

	/**
	 * 拓展地点
	 */
	private String place;

	/**
	 * 任务的起始日期
	 */
	private String startTime;

	/**
	 * 任务的结束日期
	 */
	private String endTime;

	/**
	 * 任务的目标人数
	 */
	private String targetPeople;

	/**
	 * 此地点实际外拓的人数
	 */
	private String realPeople;

	/**
	 * 外拓的实际金额
	 */
	private String realAmount;

	/**
	 * 状态 任务状态（0：未开始，1：进行中，2：已结束）
	 */
	private String status = "1";

	/**
	 * 门店品类id
	 */
	private String storeCateId; // 新增拓展任务，编辑拓展任务的时候，需要

	/**
	 * 品类编码
	 */
	private String cateCode;

	private List<StoreExpandEmployeeVo> employeeList;

	public String getExpandId() {
		return expandId;
	}

	public void setExpandId(String expandId) {
		this.expandId = expandId;
	}

	public String getPlace() {
		return place;
	}

	public void setPlace(String place) {
		this.place = place;
	}

	public String getStartTime() {
		return startTime;
	}

	public void setStartTime(String startTime) {
		this.startTime = startTime;
		if (startTime == null) {
			return;
		}
		String now = new DateTime().toString(MemberConstants.formatter);
		// 当前时间，在开始时间之前，表示任务还未开始
		if (now.compareTo(startTime) < 0) {
			this.setStatus("0");
		}
	}

	public String getEndTime() {
		return endTime;
	}

	public void setEndTime(String endTime) {
		this.endTime = endTime;
		if (endTime == null) {
			return;
		}
		String now = new DateTime().toString(MemberConstants.formatter);
		// 当前时间，在结束时间之后，表示任务已经结束
		if (now.compareTo(endTime) > 0) {
			this.setStatus("2");
		}
	}

	public String getTargetPeople() {
		return targetPeople;
	}

	public void setTargetPeople(String targetPeople) {
		this.targetPeople = targetPeople;
	}

	public String getRealPeople() {
		return realPeople;
	}

	public void setRealPeople(String realPeople) {
		this.realPeople = realPeople;
	}

	public String getRealAmount() {
		return realAmount;
	}

	public void setRealAmount(String realAmount) {
		this.realAmount = realAmount;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getStoreCateId() {
		return storeCateId;
	}

	public void setStoreCateId(String storeCateId) {
		this.storeCateId = storeCateId;
	}

	public List<StoreExpandEmployeeVo> getEmployeeList() {
		return employeeList;
	}

	public void setEmployeeList(List<StoreExpandEmployeeVo> employeeList) {
		this.employeeList = employeeList;
	}

	public String getCateCode() {
		return cateCode;
	}

	public void setCateCode(String cateCode) {
		this.cateCode = cateCode;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
	}
}
